using System;

namespace Me.Prettyprint.Cassandra.Utils
{
    /// <summary>
    /// light weight assert facility. In Hector, it is a light weight
    /// replacement for Spring assert. For Nector we don't use Spring,
    /// but it may still be useful.
    /// </summary>
	public sealed class Assert
	{
        public static void NotNull(object obj, string message)
        {
            if (obj == null)
            {
                throw new System.NullReferenceException(message);
            }
        }

        public static void isTrue(bool b, String message)
        {
            if (!b)
            {
                throw new ArgumentException(message);
            }
        }
	}
}